package com.zis.auction.model;

import com.zis.auction.model.base.CounselModel;
import com.zis.utils.DateUtil;
import org.beetl.sql.core.annotatoin.Table;

/**
 * Create by wangshen 2018/1/12
 */
@Table(name = "r_counsel")
public class Counsel extends CounselModel{

    public String getFormatConTime(){
        if (getConTime()!=null) {
            return DateUtil.getDate(getConTime(), "yyyy-MM-dd HH:mm:ss");
        }
        return null;
    }

    public String getFormatReplyTime(){
        if (getReplyTime()!=null) {
            return DateUtil.getDate(getReplyTime(), "yyyy-MM-dd HH:mm:ss");
        }
        return null;
    }

    public String getFormatState () {
        if (getState()==0) {
            return "待回复";
        }
        if (getState()==1) {
            return "已回复";
        }
        return null;
    }
}
